<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2021/12/1
 * Time: 10:19
 */

class order
{
        public $userID;//用户Id
        private $nums;//现金or积分
        private $num;//订单编号
        public function __construct($userID,$nums)
        {
            $this->userID=$userID;
            $this->nums=$nums;
            echo '订单初始化 <br />';
        }

        public  function  aa(){
            echo'创建订单<br />';
            $num = $this->num();
        }

        public function pay (){
            echo '修改订单状态!<br />';
            echo '增加支付日志!<br />';
            echo '发送短信到用户手机!<br />';
            echo '发送微信到用户微信!<br />';
            echo '付款成功!<br />';
        }

        private function num(){
            echo '订单编号'.time().mt_rand(10000,99999).'<br />';

        }

        public function  bb(){
            echo '取消订单成功<br />';
        }

        public  function __destruct()
        {
         echo '订单关闭';
            // TODO: Implement __destruct() method.
        }
}